package com.recruitment.common.result;

/**
 * 返回状态码
 */
public enum ResultCode {
    
    SUCCESS(200, "操作成功"),
    ERROR(500, "操作失败"),
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    
    // 用户相关错误码
    USER_NOT_FOUND(1001, "用户不存在"),
    USERNAME_OR_PASSWORD_ERROR(1002, "用户名或密码错误"),
    USER_ALREADY_EXISTS(1003, "用户已存在"),
    USER_ACCOUNT_DISABLED(1004, "用户账号已被禁用"),
    
    // 企业相关错误码
    COMPANY_NOT_FOUND(2001, "企业不存在"),
    COMPANY_NOT_VERIFIED(2002, "企业未认证"),
    COMPANY_ALREADY_EXISTS(2003, "企业已存在"),
    
    // 职位相关错误码
    JOB_NOT_FOUND(3001, "职位不存在"),
    JOB_ALREADY_CLOSED(3002, "职位已关闭"),
    JOB_ALREADY_APPLIED(3003, "已申请该职位"),
    
    // 简历相关错误码
    RESUME_NOT_FOUND(4001, "简历不存在"),
    RESUME_INCOMPLETE(4002, "简历信息不完整"),
    
    // 文件相关错误码
    FILE_UPLOAD_FAILED(5001, "文件上传失败"),
    FILE_NOT_FOUND(5002, "文件不存在"),
    FILE_TYPE_NOT_SUPPORTED(5003, "文件类型不支持"),
    
    // 系统相关错误码
    SYSTEM_ERROR(9001, "系统错误"),
    NETWORK_ERROR(9002, "网络错误"),
    DATABASE_ERROR(9003, "数据库错误");
    
    private final Integer code;
    private final String message;
    
    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    
    public Integer getCode() {
        return code;
    }
    
    public String getMessage() {
        return message;
    }
} 